3.5.80 \(\int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx\) [480]

Optimal. Leaf size=366 \[ \frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}-\frac {\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3-m}{2};\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) \sin (c+d x)}{d (3+m) \left (1-m^2\right ) \sqrt {\sin ^2(c+d x)}}+\frac {\left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \, _2F_1\left (\frac {1}{2},-\frac {m}{2};\frac {2-m}{2};\cos ^2(c+d x)\right ) \sec ^m(c+d x) \sin (c+d x)}{d m (2+m) \sqrt {\sin ^2(c+d x)}} \]

[Out]

b*(b^2*B*(2+m)+3*a*A*b*(3+m)+2*a^2*B*(4+m))*sec(d*x+c)^(1+m)*sin(d*x+c)/d/(1+m)/(3+m)+b^2*(A*b*(3+m)+a*B*(5+m)
)*sec(d*x+c)^(2+m)*sin(d*x+c)/d/(2+m)/(3+m)+b*B*sec(d*x+c)^(1+m)*(a+b*sec(d*x+c))^2*sin(d*x+c)/d/(3+m)-(b^3*B*
m*(2+m)+3*a*A*b^2*m*(3+m)+3*a^2*b*B*m*(3+m)+a^3*A*(m^2+4*m+3))*hypergeom([1/2, 1/2-1/2*m],[3/2-1/2*m],cos(d*x+
c)^2)*sec(d*x+c)^(-1+m)*sin(d*x+c)/d/(3+m)/(-m^2+1)/(sin(d*x+c)^2)^(1/2)+(A*b^3*(1+m)+3*a*b^2*B*(1+m)+3*a^2*A*
b*(2+m)+a^3*B*(2+m))*hypergeom([1/2, -1/2*m],[1-1/2*m],cos(d*x+c)^2)*sec(d*x+c)^m*sin(d*x+c)/d/m/(2+m)/(sin(d*
x+c)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.52, antiderivative size = 366, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4111, 4161, 4132, 3857, 2722, 4131} \begin {gather*} \frac {b \sin (c+d x) \left (2 a^2 B (m+4)+3 a A b (m+3)+b^2 B (m+2)\right ) \sec ^{m+1}(c+d x)}{d (m+1) (m+3)}-\frac {\sin (c+d x) \left (a^3 A \left (m^2+4 m+3\right )+3 a^2 b B m (m+3)+3 a A b^2 m (m+3)+b^3 B m (m+2)\right ) \sec ^{m-1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3-m}{2};\cos ^2(c+d x)\right )}{d (m+3) \left (1-m^2\right ) \sqrt {\sin ^2(c+d x)}}+\frac {\sin (c+d x) \left (a^3 B (m+2)+3 a^2 A b (m+2)+3 a b^2 B (m+1)+A b^3 (m+1)\right ) \sec ^m(c+d x) \, _2F_1\left (\frac {1}{2},-\frac {m}{2};\frac {2-m}{2};\cos ^2(c+d x)\right )}{d m (m+2) \sqrt {\sin ^2(c+d x)}}+\frac {b^2 \sin (c+d x) (a B (m+5)+A b (m+3)) \sec ^{m+2}(c+d x)}{d (m+2) (m+3)}+\frac {b B \sin (c+d x) \sec ^{m+1}(c+d x) (a+b \sec (c+d x))^2}{d (m+3)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^m*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]),x]

[Out]

(b*(b^2*B*(2 + m) + 3*a*A*b*(3 + m) + 2*a^2*B*(4 + m))*Sec[c + d*x]^(1 + m)*Sin[c + d*x])/(d*(1 + m)*(3 + m))
+ (b^2*(A*b*(3 + m) + a*B*(5 + m))*Sec[c + d*x]^(2 + m)*Sin[c + d*x])/(d*(2 + m)*(3 + m)) + (b*B*Sec[c + d*x]^
(1 + m)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(d*(3 + m)) - ((b^3*B*m*(2 + m) + 3*a*A*b^2*m*(3 + m) + 3*a^2*b*B
*m*(3 + m) + a^3*A*(3 + 4*m + m^2))*Hypergeometric2F1[1/2, (1 - m)/2, (3 - m)/2, Cos[c + d*x]^2]*Sec[c + d*x]^
(-1 + m)*Sin[c + d*x])/(d*(3 + m)*(1 - m^2)*Sqrt[Sin[c + d*x]^2]) + ((A*b^3*(1 + m) + 3*a*b^2*B*(1 + m) + 3*a^
2*A*b*(2 + m) + a^3*B*(2 + m))*Hypergeometric2F1[1/2, -1/2*m, (2 - m)/2, Cos[c + d*x]^2]*Sec[c + d*x]^m*Sin[c
+ d*x])/(d*m*(2 + m)*Sqrt[Sin[c + d*x]^2])

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3857

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 4111

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*(m +
n))), x] + Dist[1/(m + n), Int[(a + b*Csc[e + f*x])^(m - 2)*(d*Csc[e + f*x])^n*Simp[a^2*A*(m + n) + a*b*B*n +
(a*(2*A*b + a*B)*(m + n) + b^2*B*(m + n - 1))*Csc[e + f*x] + b*(A*b*(m + n) + a*B*(2*m + n - 1))*Csc[e + f*x]^
2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] &&
 !(IGtQ[n, 1] &&  !IntegerQ[m])

Rule 4131

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot
[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1))), x] + Dist[(C*m + A*(m + 1))/(m + 1), Int[(b*Csc[e + f*x])^m, x], x
] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]

Rule 4132

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rule 4161

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-b)*C*Csc[e + f*x]*Cot[e + f*x]*((d*Csc[e + f
*x])^n/(f*(n + 2))), x] + Dist[1/(n + 2), Int[(d*Csc[e + f*x])^n*Simp[A*a*(n + 2) + (B*a*(n + 2) + b*(C*(n + 1
) + A*(n + 2)))*Csc[e + f*x] + (a*C + B*b)*(n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C
, n}, x] &&  !LtQ[n, -1]

Rubi steps

\begin {align*} \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx &=\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\int \sec ^m(c+d x) (a+b \sec (c+d x)) \left (a (b B m+a A (3+m))+\left (b^2 B (2+m)+a (2 A b+a B) (3+m)\right ) \sec (c+d x)+b (A b (3+m)+a B (5+m)) \sec ^2(c+d x)\right ) \, dx}{3+m}\\ &=\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\int \sec ^m(c+d x) \left (a^2 (2+m) (b B m+a A (3+m))+(3+m) \left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \sec (c+d x)+b (2+m) \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^2(c+d x)\right ) \, dx}{6+5 m+m^2}\\ &=\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\int \sec ^m(c+d x) \left (a^2 (2+m) (b B m+a A (3+m))+b (2+m) \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^2(c+d x)\right ) \, dx}{6+5 m+m^2}+\frac {\left ((3+m) \left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right )\right ) \int \sec ^{1+m}(c+d x) \, dx}{6+5 m+m^2}\\ &=\frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \int \sec ^m(c+d x) \, dx}{(1+m) (3+m)}+\frac {\left ((3+m) \left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \cos ^m(c+d x) \sec ^m(c+d x)\right ) \int \cos ^{-1-m}(c+d x) \, dx}{6+5 m+m^2}\\ &=\frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \, _2F_1\left (\frac {1}{2},-\frac {m}{2};\frac {2-m}{2};\cos ^2(c+d x)\right ) \sec ^m(c+d x) \sin (c+d x)}{d m (2+m) \sqrt {\sin ^2(c+d x)}}+\frac {\left (\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \cos ^m(c+d x) \sec ^m(c+d x)\right ) \int \cos ^{-m}(c+d x) \, dx}{(1+m) (3+m)}\\ &=\frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}-\frac {\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \, _2F_1\left (\frac {1}{2},\frac {1-m}{2};\frac {3-m}{2};\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) \sin (c+d x)}{d (1-m) (1+m) (3+m) \sqrt {\sin ^2(c+d x)}}+\frac {\left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \, _2F_1\left (\frac {1}{2},-\frac {m}{2};\frac {2-m}{2};\cos ^2(c+d x)\right ) \sec ^m(c+d x) \sin (c+d x)}{d m (2+m) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.36, size = 307, normalized size = 0.84 \begin {gather*} \frac {\csc (c+d x) \left (\frac {a^3 A \cos ^4(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m}{2};\frac {2+m}{2};\sec ^2(c+d x)\right )}{m}+\frac {a^2 (3 A b+a B) \cos ^3(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sec ^2(c+d x)\right )}{1+m}+b \left (\frac {3 a (A b+a B) \cos ^2(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\sec ^2(c+d x)\right )}{2+m}+b \left (\frac {(A b+3 a B) \cos (c+d x) \, _2F_1\left (\frac {1}{2},\frac {3+m}{2};\frac {5+m}{2};\sec ^2(c+d x)\right )}{3+m}+\frac {b B \, _2F_1\left (\frac {1}{2},\frac {4+m}{2};\frac {6+m}{2};\sec ^2(c+d x)\right )}{4+m}\right )\right )\right ) \sec ^{-1+m}(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \sqrt {-\tan ^2(c+d x)}}{d (b+a \cos (c+d x))^3 (B+A \cos (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^m*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]),x]

[Out]

(Csc[c + d*x]*((a^3*A*Cos[c + d*x]^4*Hypergeometric2F1[1/2, m/2, (2 + m)/2, Sec[c + d*x]^2])/m + (a^2*(3*A*b +
 a*B)*Cos[c + d*x]^3*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Sec[c + d*x]^2])/(1 + m) + b*((3*a*(A*b + a*
B)*Cos[c + d*x]^2*Hypergeometric2F1[1/2, (2 + m)/2, (4 + m)/2, Sec[c + d*x]^2])/(2 + m) + b*(((A*b + 3*a*B)*Co
s[c + d*x]*Hypergeometric2F1[1/2, (3 + m)/2, (5 + m)/2, Sec[c + d*x]^2])/(3 + m) + (b*B*Hypergeometric2F1[1/2,
 (4 + m)/2, (6 + m)/2, Sec[c + d*x]^2])/(4 + m))))*Sec[c + d*x]^(-1 + m)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c +
 d*x])*Sqrt[-Tan[c + d*x]^2])/(d*(b + a*Cos[c + d*x])^3*(B + A*Cos[c + d*x]))

________________________________________________________________________________________

Maple [F]
time = 0.33, size = 0, normalized size = 0.00 \[\int \left (\sec ^{m}\left (d x +c \right )\right ) \left (a +b \sec \left (d x +c \right )\right )^{3} \left (A +B \sec \left (d x +c \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^m*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x)

[Out]

int(sec(d*x+c)^m*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^m*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="maxima")

[Out]

integrate((B*sec(d*x + c) + A)*(b*sec(d*x + c) + a)^3*sec(d*x + c)^m, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^m*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="fricas")

[Out]

integral((B*b^3*sec(d*x + c)^4 + A*a^3 + (3*B*a*b^2 + A*b^3)*sec(d*x + c)^3 + 3*(B*a^2*b + A*a*b^2)*sec(d*x +
c)^2 + (B*a^3 + 3*A*a^2*b)*sec(d*x + c))*sec(d*x + c)^m, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + B \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec ^{m}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**m*(a+b*sec(d*x+c))**3*(A+B*sec(d*x+c)),x)

[Out]

Integral((A + B*sec(c + d*x))*(a + b*sec(c + d*x))**3*sec(c + d*x)**m, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^m*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)),x, algorithm="giac")

[Out]

integrate((B*sec(d*x + c) + A)*(b*sec(d*x + c) + a)^3*sec(d*x + c)^m, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^3\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B/cos(c + d*x))*(a + b/cos(c + d*x))^3*(1/cos(c + d*x))^m,x)

[Out]

int((A + B/cos(c + d*x))*(a + b/cos(c + d*x))^3*(1/cos(c + d*x))^m, x)

________________________________________________________________________________________